Skip to content

WIP: Experimental Python package builds against ITK 6.0 Beta 2#381

Draft
thewtex wants to merge 1 commit into
mainfrom
test-itk-6.0b2
Draft

WIP: Experimental Python package builds against ITK 6.0 Beta 2#381
thewtex wants to merge 1 commit into
mainfrom
test-itk-6.0b2

Conversation

@thewtex
Copy link
Copy Markdown
Member

@thewtex thewtex commented Mar 24, 2026

No description provided.

@thewtex
Copy link
Copy Markdown
Member Author

thewtex commented Mar 24, 2026

@thewtex
Copy link
Copy Markdown
Member Author

thewtex commented Mar 24, 2026

xref #307

@thewtex
Copy link
Copy Markdown
Member Author

thewtex commented Mar 24, 2026

Call Stack (most recent call first):
  CMakeLists.txt:71 (FetchContent_Populate)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at /home/runner/work/ITKElastix/ITK/CMake/UseITK.cmake:28 (message):
  CMake/UseITK.cmake is deprecated.

  Please update CMakeLists.txt to use `find_package(ITK)` and link to
  "${ITK_INTERFACE_LIBRARIES}".

Call Stack (most recent call first):
  /home/runner/work/ITKElastix/build/_deps/elx-src/CMakeLists.txt:89 (include)

@N-Dekker is there a version of elastix that has been updated for ITK 6 CMake module targets?

@N-Dekker
Copy link
Copy Markdown
Collaborator

is there a version of elastix that has been updated for ITK 6 CMake module targets?

@thewtex I don't think so, sorry! The last time I tried an ITK 6 with elastix, it was still without "CMake module targets", if I understand correctly. It was using the old ITK v6.0b02 tagged by Hans: https://github.com/SuperElastix/elastix/tree/Use-ITK-v6.0b02

Do you think support for ITK 6 CMake module targets could be added without dropping ITK5, for elastix? You know, I would like the main branch of elastix to support using an official release of ITK, not just a beta. So then elastix should at least support the last non-beta of ITK, which is now ITK 5.4.5. 🤷

@thewtex
Copy link
Copy Markdown
Member Author

thewtex commented Mar 27, 2026

@N-Dekker 👍 I'll work on adding ITK 6 support, while also supporting ITK 5.

@blowekamp
Copy link
Copy Markdown
Member

@N-Dekker 👍 I'll work on adding ITK 6 support, while also supporting ITK 5.

@thewtex I am going to assume this is getting the wrapping to work with ITKv6 as opposed to a larger refactor to use ITK target and set target properties for elastix libraries?

Related is SimpleITK/SimpleITK #2543 which is trying to use Elastix with FetchConent. Elastix currently is using mostly directory properties over target properties.

@thewtex
Copy link
Copy Markdown
Member Author

thewtex commented Mar 27, 2026

@N-Dekker @blowekamp I'm not sure everything I will run into, but I am taking a look :-)

@blowekamp
Copy link
Copy Markdown
Member

@N-Dekker @blowekamp I'm not sure everything I will run into, but I am taking a look :-)

It's unfortunate I neglected to look into building elastix this way and I'm not online next week.

Briefly looking at the error:

CMake Error at /Users/svc-dashboard/D/P/ITKPythonPackage/ITK-source/ITK/CMake/ITKModuleMacros.cmake:378 (target_link_libraries):
  The link interface of target "ElastixModule" contains:

    ITK::elastix_lib

This looks like elastix_lib may have been a string on a link line, and not a proper cmake target?

In this module Elastix provides essentially third party libraries provided in this module. It would be relevant to look at itk_module_target

https://github.com/InsightSoftwareConsortium/ITK/blob/main/CMake/ITKModuleMacros.cmake#L829-L849

And how it it's used in other thridparty and remote modules. When configuring ITKElastix it should produce a Targets file in the ITK build's cmake/ITK-6.0 path ( I don't recall the exact name/path right now for the externally built targets. ) I Hope that's helpful.

@thewtex
Copy link
Copy Markdown
Member Author

thewtex commented Mar 27, 2026

@blowekamp thanks!

@blowekamp
Copy link
Copy Markdown
Member

See #382 and SuperElastix/elastix#1426 for work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants